#  Copyright (c) 2014-present, Facebook, Inc.
#  All rights reserved.
#
#  This source code is licensed under both the Apache 2.0 license (found in the
#  LICENSE file in the root directory of this source tree) and the GPLv2 (found
#  in the COPYING file in the root directory of this source tree).
#  You may select, at your option, one of the above-listed licenses.

target_sources(osquery_tables_integration_tests 
  PRIVATE
    "${CMAKE_CURRENT_LIST_DIR}/helper.h"
    "${CMAKE_CURRENT_LIST_DIR}/helper.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/uptime.cpp"
)

target_sources(osquery_tables_integration_tests 
  PRIVATE
    "${CMAKE_CURRENT_LIST_DIR}/arp_cache.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/carbon_black_info.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/carves.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/chrome_extensions.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/cpuid.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/curl.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/curl_certificate.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/device_file.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/device_hash.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/device_partitions.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/etc_hosts.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/etc_protocols.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/etc_services.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/example.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/file.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/groups.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/hash.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/interface_addresses.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/interface_details.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/interface_ipv6.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/kernel_info.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/listening_ports.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/lldp_neighbors.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/logged_in_users.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/os_version.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/osquery_events.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/osquery_extensions.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/osquery_flags.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/osquery_info.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/osquery_packs.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/osquery_registry.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/osquery_schedule.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/platform_info.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/process_memory_map.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/process_open_sockets.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/processes.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/python_packages.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/routes.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/smart_drive_info.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/system_info.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/time.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/uptime.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/user_groups.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/users.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/yara.cpp"
    "${CMAKE_CURRENT_LIST_DIR}/yara_events.cpp"
)

if(POSIX) 
  target_sources(osquery_tables_integration_tests 
    PRIVATE
      "${CMAKE_CURRENT_LIST_DIR}/acpi_tables.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/appcompat_shims.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/apt_sources.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/augeas.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/authenticode.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/authorized_keys.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/autoexec.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/bitlocker_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/block_devices.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/chocolatey_packages.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/cpu_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/cpu_time.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/crontab.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/disk_encryption.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/disk_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/dns_resolvers.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_container_labels.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_container_mounts.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_container_networks.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_container_ports.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_container_processes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_container_stats.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_containers.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_image_labels.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_images.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_network_labels.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_networks.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_version.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_volume_labels.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/docker_volumes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/drivers.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/file_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/firefox_addons.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/hardware_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/ie_extensions.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/known_hosts.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/kva_speculative_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/last.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/load_average.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/logical_drives.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/logon_sessions.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/magic.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/memory_array_mapped_addresses.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/memory_arrays.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/memory_device_mapped_addresses.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/memory_devices.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/memory_error_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/mounts.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/ntfs_acl_permissions.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/oem_strings.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/opera_extensions.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/patches.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/pci_devices.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/physical_disk_performance.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/pipes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/powershell_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/process_envs.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/process_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/process_open_files.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/programs.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/prometheus_metrics.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/registry.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/scheduled_tasks.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/services.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/shared_resources.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/shell_history.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/smbios_tables.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/ssh_configs.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/sudoers.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/suid_bin.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/system_controls.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/ulimit_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/usb_devices.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/user_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/user_ssh_keys.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/video_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/winbaseobj.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/windows_crashes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/windows_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wmi_bios_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wmi_cli_event_consumers.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wmi_event_filters.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wmi_filter_consumer_binding.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wmi_script_event_consumers.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/yum_sources.cpp"
  )
endif()

if(LINUX)
  target_sources(osquery_tables_integration_tests 
    PRIVATE
      "${CMAKE_CURRENT_LIST_DIR}/deb_packages.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/ec2_instance_metadata.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/ec2_instance_tags.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/elf_dynamic.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/elf_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/elf_sections.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/elf_segments.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/elf_symbols.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/intel_me_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/iptables.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/kernel_integrity.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/kernel_modules.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/md_devices.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/md_drives.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/md_personalities.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/memory_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/memory_map.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/msr.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/npm_packages.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/portage_keywords.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/portage_packages.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/portage_use.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/process_file_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/process_namespaces.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/rpm_package_files.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/rpm_packages.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/selinux_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/shadow.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/shared_memory.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/socket_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/syslog_events.cpp"
  )
endif()

if(WINDOWS)
  target_sources(osquery_tables_integration_tests 
    PRIVATE
      "${CMAKE_CURRENT_LIST_DIR}/certificates.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/intel_me_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/startup_items.cpp"
  )
endif()

if(FREEBSD)
  target_sources(osquery_tables_integration_tests 
    PRIVATE
      "${CMAKE_CURRENT_LIST_DIR}/fbsd_kmods.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/pkg_packages.cpp"
  )
endif()

if(APPLE)
  target_sources(osquery_tables_integration_tests 
    PRIVATE
      "${CMAKE_CURRENT_LIST_DIR}/account_policy_data.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/ad_config.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/alf.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/alf_exceptions.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/alf_explicit_auths.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/alf_services.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/app_schemes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/apps.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/asl.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/authorization_mechanisms.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/authorizations.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/battery.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/browser_plugins.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/certificates.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/crashes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/cups_destinations.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/cups_jobs.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/device_firmware.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/disk_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/event_taps.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/extended_attributes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/fan_speed_sensors.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/gatekeeper.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/gatekeeper_approved_apps.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/homebrew_packages.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/iokit_devicetree.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/iokit_registry.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/kernel_extensions.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/kernel_panics.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/keychain_acls.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/keychain_items.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/launchd.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/launchd_overrides.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/managed_policies.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/mdfind.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/nfs_shares.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/nvram.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/package_bom.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/package_install_history.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/package_receipts.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/plist.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/power_sensors.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/preferences.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/quicklook_cache.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/safari_extensions.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/sandboxes.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/shared_folders.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/sharing_preferences.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/signature.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/sip_config.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/smc_keys.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/startup_items.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/temperature_sensors.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/time_machine_backups.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/time_machine_destinations.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/user_interaction_events.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/virtual_memory_info.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wifi_networks.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wifi_status.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/wifi_survey.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/xprotect_entries.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/xprotect_meta.cpp"
      "${CMAKE_CURRENT_LIST_DIR}/xprotect_reports.cpp"
  ) 
endif()
